#include "stdafx.h"
#include "calctool.h"


int muldiv(int a, int b, int c) 
{ 
    int nMul = a * b, 
        nMod = nMul % c, 
        nRes = nMul / c; 

    if(nMod >= c / 2)    // Round up if >= 0.5 
        nRes++; 
    return nRes; 
}
